package day05;

public class homework4_2 {
    public static void main(String[] args) {
        int[] a=new int[8];
        for(int t=0;t<a.length;t++)
        {
            a[t]=(int)(Math.random()*100);
            System.out.println(a[t]);
        }
        int max = a[0];
        for(int t=1;t<a.length;t++){
            if(a[t]>max){
                max=a[t];
            }

        }
        System.out.println("最大值为："+max);
    }
}
